Integrand size = 15, antiderivative size = 68 \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {x^3}{6}+\frac {1}{16} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {1+2 x}{\sqrt {2}}\right )-\frac {1}{16} \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right ) \]
[Out]
Time = 0.08 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.533, Rules used = {5503, 5495, 5491, 5483, 2266, 2235, 2236, 5482} \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{16} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {2 x+1}{\sqrt {2}}\right )+\frac {x^3}{6}+\frac {1}{8} x \sinh \left (2 x^2+2 x+\frac {1}{2}\right )-\frac {1}{16} \sinh \left (2 x^2+2 x+\frac {1}{2}\right ) \]
[In]
[Out]
Rule 2235
Rule 2236
Rule 2266
Rule 5482
Rule 5483
Rule 5491
Rule 5495
Rule 5503
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {x^2}{2}+\frac {1}{2} x^2 \cosh \left (\frac {1}{2}+2 x+2 x^2\right )\right ) \, dx \\ & = \frac {x^3}{6}+\frac {1}{2} \int x^2 \cosh \left (\frac {1}{2}+2 x+2 x^2\right ) \, dx \\ & = \frac {x^3}{6}+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right )-\frac {1}{8} \int \sinh \left (\frac {1}{2}+2 x+2 x^2\right ) \, dx-\frac {1}{4} \int x \cosh \left (\frac {1}{2}+2 x+2 x^2\right ) \, dx \\ & = \frac {x^3}{6}-\frac {1}{16} \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{16} \int e^{-\frac {1}{2}-2 x-2 x^2} \, dx-\frac {1}{16} \int e^{\frac {1}{2}+2 x+2 x^2} \, dx+\frac {1}{8} \int \cosh \left (\frac {1}{2}+2 x+2 x^2\right ) \, dx \\ & = \frac {x^3}{6}-\frac {1}{16} \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{16} \int e^{-\frac {1}{8} (-2-4 x)^2} \, dx-\frac {1}{16} \int e^{\frac {1}{8} (2+4 x)^2} \, dx+\frac {1}{16} \int e^{-\frac {1}{2}-2 x-2 x^2} \, dx+\frac {1}{16} \int e^{\frac {1}{2}+2 x+2 x^2} \, dx \\ & = \frac {x^3}{6}+\frac {1}{32} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {1+2 x}{\sqrt {2}}\right )-\frac {1}{32} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {1+2 x}{\sqrt {2}}\right )-\frac {1}{16} \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{16} \int e^{-\frac {1}{8} (-2-4 x)^2} \, dx+\frac {1}{16} \int e^{\frac {1}{8} (2+4 x)^2} \, dx \\ & = \frac {x^3}{6}+\frac {1}{16} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {1+2 x}{\sqrt {2}}\right )-\frac {1}{16} \sinh \left (\frac {1}{2}+2 x+2 x^2\right )+\frac {1}{8} x \sinh \left (\frac {1}{2}+2 x+2 x^2\right ) \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.46 \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {16 \sqrt {e} x^3+3 (-1+e) (-1+2 x) \cosh (2 x (1+x))+3 \sqrt {2 e \pi } \text {erf}\left (\frac {1+2 x}{\sqrt {2}}\right )-3 \sinh (2 x (1+x))-3 e \sinh (2 x (1+x))+6 x \sinh (2 x (1+x))+6 e x \sinh (2 x (1+x))}{96 \sqrt {e}} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.13
method | result | size |
risch | \(\frac {x^{3}}{6}-\frac {x \,{\mathrm e}^{-\frac {\left (1+2 x \right )^{2}}{2}}}{16}+\frac {{\mathrm e}^{-\frac {\left (1+2 x \right )^{2}}{2}}}{32}+\frac {\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, x +\frac {\sqrt {2}}{2}\right )}{32}+\frac {x \,{\mathrm e}^{\frac {\left (1+2 x \right )^{2}}{2}}}{16}-\frac {{\mathrm e}^{\frac {\left (1+2 x \right )^{2}}{2}}}{32}\) | \(77\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 268 vs. \(2 (52) = 104\).
Time = 0.25 (sec) , antiderivative size = 268, normalized size of antiderivative = 3.94 \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {16 \, x^{3} \cosh \left (x^{2} + x + \frac {1}{4}\right )^{2} + 3 \, {\left (2 \, x - 1\right )} \cosh \left (x^{2} + x + \frac {1}{4}\right )^{4} + 12 \, {\left (2 \, x - 1\right )} \cosh \left (x^{2} + x + \frac {1}{4}\right ) \sinh \left (x^{2} + x + \frac {1}{4}\right )^{3} + 3 \, {\left (2 \, x - 1\right )} \sinh \left (x^{2} + x + \frac {1}{4}\right )^{4} + 2 \, {\left (8 \, x^{3} + 9 \, {\left (2 \, x - 1\right )} \cosh \left (x^{2} + x + \frac {1}{4}\right )^{2}\right )} \sinh \left (x^{2} + x + \frac {1}{4}\right )^{2} + 4 \, {\left (8 \, x^{3} \cosh \left (x^{2} + x + \frac {1}{4}\right ) + 3 \, {\left (2 \, x - 1\right )} \cosh \left (x^{2} + x + \frac {1}{4}\right )^{3}\right )} \sinh \left (x^{2} + x + \frac {1}{4}\right ) + 3 \, \sqrt {\pi } {\left (\sqrt {2} \cosh \left (x^{2} + x + \frac {1}{4}\right )^{2} \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + 1\right )}\right ) + 2 \, \sqrt {2} \cosh \left (x^{2} + x + \frac {1}{4}\right ) \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + 1\right )}\right ) \sinh \left (x^{2} + x + \frac {1}{4}\right ) + \sqrt {2} \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + 1\right )}\right ) \sinh \left (x^{2} + x + \frac {1}{4}\right )^{2}\right )} - 6 \, x + 3}{96 \, {\left (\cosh \left (x^{2} + x + \frac {1}{4}\right )^{2} + 2 \, \cosh \left (x^{2} + x + \frac {1}{4}\right ) \sinh \left (x^{2} + x + \frac {1}{4}\right ) + \sinh \left (x^{2} + x + \frac {1}{4}\right )^{2}\right )}} \]
[In]
[Out]
\[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\int x^{2} \cosh ^{2}{\left (x^{2} + x + \frac {1}{4} \right )}\, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.30 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.66 \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{6} \, x^{3} + \frac {1}{32} \, {\left (2 \, x e^{\frac {1}{2}} - e^{\frac {1}{2}}\right )} e^{\left (2 \, x^{2} + 2 \, x\right )} - \frac {1}{64} i \, \sqrt {2} {\left (-\frac {2 i \, {\left (2 \, x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, \frac {1}{2} \, {\left (2 \, x + 1\right )}^{2}\right )}{{\left ({\left (2 \, x + 1\right )}^{2}\right )}^{\frac {3}{2}}} + \frac {i \, \sqrt {\pi } {\left (2 \, x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (2 \, x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {{\left (2 \, x + 1\right )}^{2}}} + 2 i \, \sqrt {2} e^{\left (-\frac {1}{2} \, {\left (2 \, x + 1\right )}^{2}\right )}\right )} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.90 \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{6} \, x^{3} + \frac {1}{32} \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + 1\right )}\right ) + \frac {1}{32} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x^{2} + 2 \, x + \frac {1}{2}\right )} - \frac {1}{32} \, {\left (2 \, x - 1\right )} e^{\left (-2 \, x^{2} - 2 \, x - \frac {1}{2}\right )} \]
[In]
[Out]
Timed out. \[ \int x^2 \cosh ^2\left (\frac {1}{4}+x+x^2\right ) \, dx=\int x^2\,{\mathrm {cosh}\left (x^2+x+\frac {1}{4}\right )}^2 \,d x \]
[In]
[Out]